<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>奖品列表</title>
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
<script src="http://g.tbcdn.cn/fi/bui/jquery-1.8.1.min.js"></script>
<script src="http://g.alicdn.com/bui/seajs/2.3.0/sea.js"></script>
<script src="http://g.alicdn.com/bui/bui/1.1.10/config.js"></script>
<script src="/assets/kxdr/gift.js"></script>
</head>
<body style="width:990px;margin:0 auto;padding:10px 0;">

 <div class="doc-content">
    <div class="panel">
      <div class="panel-body">
	  <div class="row">
		<div class="span24 doc-content">
		<h3 class="pull-left">{$L.APP_HOME} >> {$L.APP_NAME} >> 奖品列表</h3>
		
	<div class="button-group pull-right">
	  <a href="/?m=Kxdr&c=Gift" class="button button-primary "><< 返回奖品管理</a>
    </div>
		</div>
	  </div>
	  <hr />
	  
	  		<div id="tab" class="bui-tab-panel bui-tab nav-tabs" aria-disabled="false" aria-pressed="false">
				<ul style="font-size:14px">
				  <li class="bui-tab-panel-item active bui-tab-item" aria-disabled="false" aria-pressed="false"><a href="/?m=Kxdr&c=Gift">{$curtp}</a></li>
				</ul>
			</div>
        <div id="panel" class="span24 " style="min-height:400px;">
	  <div class="row">
  <div class="doc-content panel-body clearfix ">
    <div id="content">
		<form id="J_Form" class="form-horizontal" method="post" action="/?m=Kxdr&c=Gift&a=save">
		<input name="giftid" value="{$gid}" type="hidden" />
		<input name="gift_type" value="{$gift.type}" type="hidden" />
		<div class="span11">
        <div class="row">
          <div class="control-group span15">
            <label class="control-label">奖品名称：</label>
            <div class="controls">
			  <input name="giftname" type="text" class="pull-left span6 control-text js-giftname" data-rules="{ldelim}required:true{rdelim}" data-msg="请填入奖品名称"   value="{$gift.name|default:""}">
            </div>
          </div>
        </div>
        <div class="row">
          <div class="control-group span15">
            <label class="control-label">奖品类型：</label>
            <div class="controls">
				  {$curtp}
            </div>
          </div>
        </div>
        <div class="row">
          <div class="control-group span15">
            <label class="control-label">奖品主图：</label>
            <div class="controls" style="height:160px">
			  <img class="pull-left js-picview" src="{$gift.pic_url}_150x150.jpg" />
			  <input type="hidden" class="js-picurl" name="picurl" value="{$gift.pic_url|default:""}" />
				<div class="pull-left" id="J_Uploader">
				</div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="control-group span15" style="height:80px">
            <label class="control-label">领取方式：</label>
            <div class="controls">
				<textarea class="input-large js-detail" name="detail">{$gift.details}</textarea>
            </div>
          </div>
        </div>
		</div>
		<div class="span8">
        <div class="row js-jiazhi">
          <div class="control-group span15">
            <label class="control-label">价值：</label>
            <div class="controls">
			  <input name="price" type="text" class="pull-left input-small control-text js-price" value="{$gift.price}">元
            </div>
          </div>
        </div>
		{if $gift.type!=4}
        <div class="row js-shuliang">
          <div class="control-group span15">
            <label class="control-label">数量：</label>
            <div class="controls">
			  <input name="quantity" type="text" class="pull-left input-small control-text js-count" value="{$gift.quantity}">件<span class="auxiliary-text aux-tip2371">(初始{$gift.quantity_initial}件)</span>
            </div>
          </div>
        </div>
		{/if}
		{if $gift.type==7}
        <div class="row js-cishu ">
          <div class="control-group span15">
            <label class="control-label">抽奖次数：</label>
            <div class="controls">
			  <input name="lott" type="text" class="pull-left input-small control-text js-lott" value="{$gift.zailai}">次
            </div>
          </div>
        </div>
		{/if}
		{if $gift.type==10}
        <div class="row js-jifen ">
          <div class="control-group span15">
            <label class="control-label">积分：</label>
            <div class="controls">
			  <input name="jf" type="text" class="pull-left input-small control-text js-jf" value="{$gift.jifen}">积分
            </div>
          </div>
        </div>
		{/if}
		{if $gift.type==5}
        <div class="row js-zhekou ">
          <div class="control-group span15">
            <label class="control-label">超低折扣：</label>
            <div class="controls">
			  <input type="text" class="pull-left input-small control-text js-promoid hide" name="promoid" readonly value="{$gift.promoid}">
			  <input type="hidden" class="pull-left input-small control-text js-tagid " name="tagid" value="{$gift.tagid}">
			  <button class="button button-danger button-small js-get-prom" type="button" >选择</button>
            </div>
          </div>
        </div>
		{/if}
		{if $gift.type==11}
        <div class="row js-rongyu ">
          <div class="control-group span15">
            <label class="control-label">荣誉：</label>
            <div class="controls">
			  <span class="medal"><span> <img src="{$gift.medal_pic}_20x20.jpg">  {$gift.medal_name}</span></span>
			  <input name="medal_id" type="hidden" class="pull-left input-small control-text js-medalid " value="{$gift.medal_id}">
			  <input name="medal_name"  class="pull-left input-small control-text js-medal_name " type="hidden" value="{$gift.medal_name}">
			  <input name="medal_pic"  class="pull-left input-small control-text js-medal_pic " type="hidden" value="{$gift.medal_pic}">
			  <button class="button button-danger button-small js-get-metal" type="button" >选择</button>
            </div>
          </div>
        </div>
		{/if}
		{if $gift.type==1 || $gift.type==6}
        <div class="row js-link">
          <div class="control-group span15">
            <label class="control-label">链接：</label>
            <div class="controls">
			  <input name="gifturl" type="text" class="pull-left control-text span8 js-gifturl" value="{$gift.link|default:""}">
            </div>
          </div>
        </div>
		{/if}
		{if $gift.type==4}
		<div id="zjkm" class="hide"><div style="overflow:auto;height:198px">
			{foreach from=$kmlist item=km}{if $km.status==9}{$km.cardno},{$km.secret}<br />{/if}{/foreach}</div>
		</div>
        <div class="row js-km" style="height:120px;cursor:pointer">
          <div class="control-group span15">
            <label class="control-label">已中奖卡密：</label>
            <div class="controls span8 kmlist" style="overflow:auto;height:100px;border:1px solid #EEE;padding:5px">
			{foreach from=$kmlist item=km}{if $km.status==9}{$km.cardno},{$km.secret}<br />{/if}{/foreach}
			</div>
		  </div>
		</div>
        <div class="row js-km" style="height:120px">
          <div class="control-group span15">
            <label class="control-label">剩余的卡密：</label>
            <div class="controls">
			  <textarea class="input-large js-kmlist" name="kmlist" style="height:150px">{foreach from=$kmlist item=km}{if $km.status==0}{$km.cardno},{$km.secret}
{/if}{/foreach}</textarea>
            </div>
          </div>
        </div>
		{/if}
		</div>
		<div class="control-group span23 centered res">
		<button class="button save" type="submmit">完成</button>
		 <a href="/?m=Kxdr&c=Gift">取消</a>
		</div>
    </form>
	</div>

      </div>
	  </div></div>
    </div>
  </div>
  
  
</body>
</html>